<template>
  <div v-if="modal">
    <Modal
      v-model="modal"
      width="1000px"
      :closable="false"
    >
      <template #header>
        <div style="display: flex;align-items: center;padding: 16px 15px 0 15px">
          <div style="  font-weight: 700;font-size: 14px; text-align: left;color: #b40001;">
            导入社区工作者信息
          </div>
          <div style="margin-left: auto">
            <img @click="modal=false"
                 src="@/assets/images/V2-new-view/resource_close.png"
                 style="margin-left:auto;width: 20px;height: 20px;">
          </div>
        </div>
      </template>
      <template #footer>
        <div style="display: flex;margin-top: 30px">
          <Button type="error"
                  style="width: 64px;height: 32px;border-radius: 5px;background: #b40001;padding: 0"
                  @click="modal=false">确定
          </Button>
          <Button type="primary"
                  style="width: 64px;height: 32px;border-radius: 5px;background: #c9c9c9;border: #c9c9c9;color: #161616;"
                  @click="modal=false" class="close">取消
          </Button>
        </div>
      </template>
      <dispose-excel :columns="columns" :url="url"></dispose-excel>
    </Modal>
  </div>
</template>

<script>
import DisposeExcel from '../../dispose-excel/dispose-excel'

export default {
  name: 'import-excel',
  components: { DisposeExcel },
  data () {
    return {
      columns: [
        {
          align: 'center',
          title: '姓名',
          key: 'CPBI003',
          fixed: 'left'
        },
        {
          align: 'center',
          title: '身份证号',
          width: '160',
          key: 'CPBI002',
          fixed: 'left'
        },
        {
          align: 'center',
          title: '联系方式',
          width: '160',
          key: 'CPBI013'
        },
        {
          align: 'center',
          title: '性别',
          key: 'CPBI005'
        },
        {
          align: 'center',
          title: '婚姻状况',
          key: 'CPBI006'
        },
        {
          align: 'center',
          title: '民族',
          key: 'CPBI007'
        },
        {
          align: 'center',
          title: '政治面貌',
          key: 'CPBI008'
        },
        {
          align: 'center',
          title: '是否服役',
          key: 'CPBI009'
        },
        {
          align: 'center',
          title: '是否军嫂',
          key: 'CPBI010'
        },
        {
          align: 'center',
          title: '是否为低保或低保边缘户子女',
          key: 'CPBI011'
        },
        {
          align: 'center',
          title: '户籍地址',
          key: 'CPBI012'
        },
        {
          align: 'center',
          title: '家庭地址',
          key: 'CPBI014'
        },
        {
          align: 'center',
          title: '入职时间',
          key: 'CPWI001'
        },
        {
          align: 'center',
          title: '任职情况',
          key: 'CPWI006'
        },
        {
          align: 'center',
          title: '任职时间',
          key: 'CPWI007'
        },
        {
          align: 'center',
          title: '是否党组织成员',
          key: 'CPWI011'
        },
        {
          align: 'center',
          title: '是否居委会成员',
          key: 'CPWI012'
        },
        {
          align: 'center',
          title: '笔试成绩',
          key: 'CPWI008'
        },
        {
          align: 'center',
          title: '面试成绩',
          key: 'CPWI009'
        },
        {
          align: 'center',
          title: '毕业院校',
          key: 'CPEI002'
        },
        {
          align: 'center',
          title: '所学专业',
          key: 'CPEI003'
        },
        {
          align: 'center',
          title: '最高学历',
          key: 'CPEI004'
        },
        {
          align: 'center',
          title: '学位',
          key: 'CPEI005'
        },
        {
          align: 'center',
          title: '毕业时间',
          key: 'CPEI006'
        }
      ],
      modal: false,
      url: '/api/ac/worker/personnelManagementService/addCommunityWorker',
      // failedUrl: '/api/as/grid/userGrid/findFailedList'
    }
  },
  methods: {
    // 初始化
    init () {
      this.modal = true
    }
  }
}
</script>

<style scoped>

</style>
